using System;
using System.Collections.Generic;
using System.Text;

namespace SurveyHost.Core.Controls
{
    public interface ISurveyQuestion
    {
        /// <summary>
        /// The question to ask
        /// </summary>
        string QuestionText { get;set;}
        /// <summary>
        /// The response from the user
        /// </summary>
        string AnswerText {get;}
        /// <summary>
        /// The question number.
        /// </summary>
        /// <remarks>Numbering should restart with each new measure</remarks>
        int QuestionIndex { get;set;}
        /// <summary>
        /// The name of the measure this question belongs to
        /// </summary>
        /// <remarks>Simple surveys have one measure; complex surveys have multiple measures.
        /// Each question is associated with its measure in the database; this property is used to 
        /// identify which measure the question is associated with.  Therefore the measure must be spelled
        /// exactly as it is recorded.  A failure to do so would result in a SqlException being thrown.</remarks>
        string MeasureName { get;set;}

        /// <summary>
        /// Fires when a user answers a question
        /// </summary>
        event EventHandler<AnswerEventArgs> AnswerGiven;
    }
}
